<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //1.199000749许业娜
        console.log(Number(true),Number(null),+undefined) ;
      
        console.log(Boolean('100'),Boolean(100),Boolean(null),!!undefined);
      
        console.log(parseInt(123,6),parseInt(0b1011011),parseInt(0X2A),parseInt(0X2A,8));

        console.log(parseFloat('123.6'),parseFloat('100px'),parseFloat(010));

        console.log(eval('87*99+2'));

        console.log(isNaN(null),isNaN('123'),isNaN('abc'),isNaN('a1b2c3'));


    //2.(1)  199000749许业娜
    var arr1 = [];
    console.log(arr1,arr1.length);
    var arr2 = [1,2,3];
    console.log(arr2[0],arr2.length);
    var arr3 = new Array();
    console.log(arr3[1],arr3.length);


    //(2) 199000749许业娜
    var arr1 = [];
    console.log(arr1,arr1.length);
    var arr2 = [1,2,3];
    arr2.shift();  //删除数组中第一个元素
    // arr2.splice(0,1);
    console.log(arr2[0],arr2.length);
    var arr3 = new Array();
    console.log(arr3[1],arr3.length);
    


    //3  199000749许业娜
    var d = new Date();
    var h = d.getHours();
    var m = d.getMinutes();
    console.log(h+":"+m);

    //4.(1) 199000749许业娜
    var reg1 = /^\d{4}$/;
    console.log(reg1.test('1234'),reg1.test('1a34'),reg1.test('12345'));

    //(2) 199000749许业娜
    var reg2 = new RegExp("^[sp]\\d{1,4}$","i");
    console.log(reg2.test('p123'),reg2.test('1234'),reg2.test('s10'));

    //（3） 199000749许业娜
    var reg3=/^1(33|53|89|80)\d{8}$/;
    console.log(reg3.test('18778090438'),reg3.test('18008924052'));

   // 5.  199000749许业娜
    var str = "1991429378@qq.com";
        var x=str.indexOf("@");
        console.log(str.substr(0,x));


   // 6  199000749许业娜
    var a = Math.floor((Math.random()*3)+1);//random返回0-1之间的随机数
    console.log(a);


   // 7  199000749许业娜
    var x = 1;
    function A(y)
    {
        var x = 2;
        function B(z)
        {
            console.log(x+y+z);
        }
        return B;
    }
    var C = A(2);
    C(3);



    </script>
</body>
</html>